<template>
  <div class="informx">
    <div class="box">
      <table border="0" width='95%' id="myRelesa1" style="margin-left:20px;sfont-size:15px; font-weight:none;text-align: left;vertical-align: super; padding:0 20px;background:#eaeaea;">
        <tr height="60">
          <td width="300">工程名称：{{messages.projectName}}</td>
          <td width="300">招标单位：{{messages.tenderee}}</td>

        </tr>
        <tr height="40">
          <td >招标代理机构：{{messages.tenderCompany}}</td>
          <td >项目类别：{{xiangmu1}}</td>
        </tr>
        <tr height="40">
          <td >工期：{{messages.schedule}}日历天 </td>
          <td >投标文件递交截止时间：{{format(messages.endDate,'yyyy-MM-dd')}}</td>
        </tr>
        <tr height="40">
          <td >投标保证金：{{messages.tenderMoney}}元 </td>
          <td >质量要求：合格</td>
        </tr>
        <tr height="40">
          <td >项目地点：{{messages.projectLocation}} </td>
          <td >合同估算价：{{messages.agreementPrice}}元</td>
        </tr>
        <tr height="40">
          <td >招标地址：{{messages.tenderAddress}} </td>
          <td style="color:red;"><span v-show="messages.billStatus==0 ? true:false">增值税专用发票</span>    <span v-show="messages.priceStatus==0 ? true:false">  超价废标 </span> </td>
        </tr>
        <tr height="40">

          <td >联系人：{{messages.contactName}}{{messages.contactMobile}}</td>
        </tr>

      </table>
      <p class="box_title1">需求描述</p>
      <div class="box_net">
        请自行下载招标资料后务必联系87396162进行信息登记以及图纸的领取！！！
        请自行下载招标资料后务必联系87396162进行信息登记以及图纸的领取！！！
      </div>
    </div>
  </div>
</template>

<script>

  export default {
    data () {
     return {
        message:'',
        messages:'',
        show1:true,
        xiangmu1:''
      }
    },
     props: {
        message2: ""
     },
    methods: {
      format(time, format) {
          var t = new Date(time);
          var tf = function(i){return (i < 10 ? '0' : '') + i};
          return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a){
            switch(a){
              case 'yyyy':
                return tf(t.getFullYear());
                break;
              case 'MM':
                return tf(t.getMonth() + 1);
                break;
              case 'mm':
                return tf(t.getMinutes());
                break;
              case 'dd':
                return tf(t.getDate());
                break;
              case 'HH':
                return tf(t.getHours());
                break;
              case 'ss':
                return tf(t.getSeconds());
                break;
            }
          })
        },
       information(){
         console.log(this.message2,'1')
        let that=this
        $.ajax({
          type: "post",
          url: local+"/awm/userManage/selectByName",
          data: {
            tenderId :this.message2
          },
          dataType: "json",
          success: function(data){
            console.log(data.resultData)
//            that.parentMsg = data.resultData
            if(data.resultData.tender){
              that. messages=data.resultData.tender
              if(data.resultData.tender.classification==1){
                that.xiangmu1='其他'
              }else if(data.resultData.tender.classification==2){
                that.xiangmu1='单一采购'
              }else if(data.resultData.tender.classification==3){
                that.xiangmu1='采购及安装'
              }else if(data.resultData.tender.classification==4){
                that.xiangmu1='纯劳务'
              }else if(data.resultData.tender.classification==5){
                that.xiangmu1='专业分包'
              }
            }
            if(data.resultData.olist){
              that. message=data.resultData.olist
            }


          },
          error:function(aa){
            console.log(aa)
          }
        });
      }
    },
    mounted: function () {
      $('.informx').width($(document).width()*0.6);
      $('.informx').height($(document).height()*0.5);
      this.information()

    },
    components: {

    }
  }
</script>

<style scoped>
.informx{
  width:850px;
  height:400px;
  overflow-y: scroll;
}
.box{
  width:100%;
  min-height:400px;
}
.box_title1{
  margin-top:30px;
  font-size:20px;
  width:100%;
  height:50px;
  line-height:50px;
  text-indent:30px;
}
.box_net{
  width:90%;
  height:auto;
  line-height:30px;
  text-align: left;
  text-indent: 30px;
  margin-left:30px;
}
#myRelesa1 tr td{
  padding:0 20px;
}
#myRelesa1 tr td span{
  float:left;
  margin-right:15px;
}
</style>
